<?php
/**
 * Created by PhpStorm.
 * User: root
 * Date: 17-6-13
 * Time: 下午7:36
 */

namespace Home\Controller;


use Think\Controller;

class PayController extends Controller
{

    public function  selectPay(){

        $orderId = I('get.order_id');
        $this->assign('order_id', $orderId);
//        var_dump($orderId);
        $this->display();
    }


    public function ajaxSelectPay(){

        $orderId = I('order_id');

        $order = M('Order')->where(array('order_id'=>$orderId, 'is_delete'=>0))->find();

        if(!$order){
            $this->ajaxReturn(array('status'=>0, 'msg'=>'未找到该条订单'));
        }
        if($order['pay_status'] == 1){
            $this->ajaxReturn(array('status'=>0, 'msg'=>'该订单已支付'));
        }
        else
            $this->ajaxReturn(array('status'=>1, 'msg'=>'没问题'));

    }


    public function submitPay(){
        $payType = I('pay_type');
        $orderId = I('order_id');
        if($payType == 1){//余额支付



        }


    }

}